/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package modules.estoque.gui.custom;

import java.awt.Graphics;
import java.awt.Image;
import javax.swing.JPanel;

/**
 *
 * @author Clezio
 */
 public class ImagePanel extends JPanel {
         private Image image;

         /**
          *
          */
         public ImagePanel() {

         }


         @Override
         protected void paintComponent(Graphics g) {
             super.paintComponent(g);
             if (getImage() != null){
                 g.drawImage(getImage(), 0, 0, getWidth(), getHeight(), this);
             }
         }

    /**
     * @return the image
     */
    public Image getImage() {
        return image;
    }

    /**
     * @param image the image to set
     */
    public void setImage(Image image) {
        this.image = image;
    }
     }
